﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:TxGar="clr-namespace:TauxGaranti" >
    
    <TxGar:GlossyStyleConverter x:Key="GlossyStyleConverter" />
    
    <Style x:Key="btn" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource controlOMANE}">
        <Setter Property="Height" Value="35" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Border
                        x:Name="Border"
                        CornerRadius="0"
                        BorderThickness="1,1,1,0"
                        Background="{StaticResource DegradeBckTitre}"
                        BorderBrush="{StaticResource BrushCouleur1Base}">
                        <ContentPresenter Margin="2" HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" RecognizesAccessKey="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefautMouseOver}" />
                            <Setter Property="Foreground" Value="{StaticResource BrushDefautMouseOverForeground}" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{DynamicResource DegradeDefaultSelected}" />
                            <Setter Property="Foreground" Value="{StaticResource BrushDefautSelectedForeground}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="btnBase_OMANE" TargetType="{x:Type Button}">
        <Setter Property="Height" Value="23" />
        <Setter Property="Width" Value="100" />
        <Setter Property="Background" Value="Green" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="Border"
                        CornerRadius="0"
                        BorderThickness="1"
                        Background="{TemplateBinding Background,Converter={StaticResource GlossyStyleConverter}}"
                        BorderBrush="{StaticResource BrushCouleur2Base}">
                        <ContentPresenter Margin="2" 
                                          HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" 
                                          RecognizesAccessKey="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefautMouseOver}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource BrushDefautMouseOverBorder}" />
                            <Setter Property="Foreground" Value="{StaticResource BrushDefautMouseOverForeground}" /> 
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Border"  Property="Background" Value="{StaticResource DegradeDefaultSelected}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource BrushDefautSelectedBorder}" />
                            <Setter Property="Foreground" Value="{StaticResource BrushDefautSelectedForeground}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!-- Boutons de correspondance -->
    <Style x:Key="btnCorresp" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border
                        x:Name="BorderExt"
                        CornerRadius="3"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        BorderBrush="{TemplateBinding BorderBrush}">
                        <Border
                            x:Name="BorderInt"
                            CornerRadius="3"
                            Margin="2,1,2,1"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Background="{TemplateBinding Background,Converter={StaticResource GlossyStyleConverter}}">
                            <ContentPresenter Margin="2" 
                                          HorizontalAlignment="Center" 
                                          VerticalAlignment="Center" 
                                          RecognizesAccessKey="True" />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
